package org.ipower.examsystem.service.impl;
 
import java.util.List;
import org.ipower.examsystem.dao.CommonEnumsDao;
import org.ipower.examsystem.domain.CommonEnums;
import org.ipower.examsystem.service.CommonEnumsService; 
/**
 * 通用枚举服务实现类。
 * @author jeasonyoung
 */
public class CommonEnumsServiceImpl  implements CommonEnumsService  {
    private static final long serialVersionUID = 1L;
    private CommonEnumsDao dao = null;
    
    @Override
    public void setCommonEnumsDao(CommonEnumsDao dao) {
        this.dao = dao;
    }

    @Override
    public List<CommonEnums> loadEnums(String enumName) {
        if(enumName != null && !enumName.isEmpty()){
            return this.dao.loadAll("EnumName", enumName);
        }
        return null;
    }
}